<layout name='Layout/layout_kehu' />
<tagLib name="html" />
<!--<link href="__PUBLIC__/js_selectors/alpha.css" rel="stylesheet" >-->
<!--<link href="__PUBLIC__/js_selectors/css.css" rel="stylesheet" >-->
<!--<script src="__PUBLIC__/js_selectors/drag.js"></script>-->
<script src="__PUBLIC__/js_selectors/industry_arr.js"></script>
<!--<script src="__PUBLIC__/js_selectors/industry_func.js"></script>-->
<script src="__PUBLIC__/js/areaJson.js"></script>
<script src="__PUBLIC__/js/json2select.min.js"></script>
<!--<script type="text/javascript src="/Public/js/areaJson.js"></script>-->
<!--<script type="text/javascript src="/Public/js/json2select.min.js"></script>-->
<script type="text/javascript">
  $(document).ready(function(){
      $("#district_select").json2select(areaJson,["河南省","南阳市","卧龙区"]);
      })
	function save() {
		if(check_form("form_data")){
			sendForm("form_data", "{:U('save')}","__URL__");
		}
	}
function IndustrySelect_2(da){
  winopen('/index.php?s=/mini_kehu/add?industry=1',600,400);
}
	function chaxun(search_txt) {
    if(search_txt == ''){
      alert('名称不能为空');
      return;
    }
    //var search_txt = search_txt;
    winopen("/index.php?s=/kehu/index/search_txt/"+search_txt, 600, 400);
	}
	</script>
<div class="customer">
	<div class="row-fluid title">
		<span>
			<nobr>添加客户</nobr>
		</span>
	</div>
	<form method='post' id="form_data">
		<input type="hidden" name="opmode" value="add">
		<input type="hidden" name="ajax" id="ajax" value="1">
		<div class="row-fluid form_box">
			<div class="row-fluid form-horizontal">
        <div class="control-group span6">
          <label class="control-label" for="name">客户性质*：</label>
          <div class="controls">
            <html:select id="nature_id" name="nature_id" style="medium"  first="选择客户性质" options="nature_list" />
          </div>
        </div>
        <div class="control-group span6">
          <label class="control-label" for="name">客户分类*：</label>
          <div class="controls">
            <html:select id="grade_id" name="grade_id" style="medium"  first="选择客户分类" options="grade_list" />
          </div>
        </div>
      </div>
			<div class="row-fluid form-horizontal">
        <div class="control-group span6">
          <label class="control-label" for="name">客户来源*：</label>
          <div class="controls">
            <html:select id="origin_id" name="origin_id" style="medium"  first="选择客户来源" options="origin_list" />
          </div>
        </div>
        <div class="control-group span6">
          <label class="control-label" for="name">客户公海*：</label>
          <div class="controls">
            <html:select id="public_store_id" name="public_store_id" style="medium"  first="选择客户公海" options="public_store_list" />
          </div>
        </div>
      </div>
			<div class="row-fluid form-horizontal">
				<div class="control-group span6">
					<label class="control-label" for="name">客户名称*：</label>
					<div class="controls">
            <input type="text" id="name" name="name"  check="require" msg="请输入名称" />
            <button type="button" class="btn" onclick="chaxun($(this).prev('input').val())">查询</button>
          </div>
				</div>
				<div class="control-group span6">
					<label class="control-label" for="short">客户网址*：</label>
					<div class="controls">
            <input type="text" id="web_url" name="web_url" msg="请输入客户网址" />
          </div>
				</div>
			</div>
			<div class="row-fluid form-horizontal">
				<div class="control-group span6">
					<label class="control-label" for="salesman">行业：</label>
					<div class="controls">
            <input id="btn_IndustryID_2" type="text" value="" onclick="IndustrySelect_2(this)" name="trade">
          </div>
						<!--<input type="text" id="salesman" name="salesman" ></div>-->
				</div>
			</div>
			<div class="row-fluid form-horizontal">
				<div class="control-group span12">
					<label class="control-label" for="biz_license">客户地区*：</label>
					<div class="controls">
            <DIV id="district_select"></div>
          </div>
				</div>
			</div>
			<div class="row-fluid form-horizontal">
				<div class="control-group span12">
					<!--<label class="control-label" for="address">客户地址*:</label>-->
					<label class="control-label" for="address">客户地址*：</label>
					<div class="controls">
            <input type="text" id="address" name="address" style="width:740px;">
          </div>
				</div>
      </div>
			<div class="row-fluid form-horizontal">
				<div class="control-group span6">
					<label class="control-label" for="contact">联系人*：</label>
					<div class="controls">
						<input type="text" id="contact" name="contact"  check="require" msg="请输入联系人"></div>
				</div>
				<div class="control-group span6">
					<label class="control-label" for="mobile">手机*：</label>
					<div class="controls">
            <input type="text" id="mobile" name="mobile"  check="require" msg="请输入手机号码" >
            <button type="button" class="btn" onclick="chaxun($(this).prev('input').val())">查询</button>
          </div>
				</div>
			</div>
			<div class="row-fluid form-horizontal">
				<div class="control-group span6">
					<label class="control-label" for="tel">电话：</label>
					<div class="controls">
						<input type="text" id="tel" name="tel" msg="请输入办公电话"></div>
				</div>
				<div class="control-group span6">
					<label class="control-label" for="fax">传真：</label>
					<div class="controls">
						<input type="text" id="fax" name="fax" ></div>
				</div>
			</div>
			<div class="row-fluid form-horizontal">
				<div class="control-group span6">
					<label class="control-label" for="qq">qq：</label>
					<div class="controls">
						<input type="text" id="qq" name="qq"></div>
				</div>
				<div class="control-group span6">
					<label class="control-label" for="email">邮箱：</label>
					<div class="controls">
						<input type="text" id="email" name="email" ></div>
				</div>
			</div>

			<div class="row-fluid form-horizontal">
				<div class="control-group span6">
					<label class="control-label" for="legal_person">企业法人：</label>
					<div class="controls">
						<input type="text" id="legal_person" name="legal_person"></div>
				</div>
				<div class="control-group span6">
					<label class="control-label" for="fund">注册资金：</label>
					<div class="controls">
						<input type="text" id="fund" name="fund" ></div>
				</div>
			</div>
			<div class="row-fluid form-horizontal">
				<div class="control-group span6">
					<label class="control-label" for="fund_date">成立日期：</label>
					<div class="controls">
						<input type="text" id="fund_date" name="fund_date"></div>
				</div>
				<div class="control-group span6">
					<label class="control-label" for="main_business">主营业务：</label>
					<div class="controls">
						<input type="text" id="main_business" name="main_business" ></div>
				</div>
			</div>
			<div class="row-fluid form-horizontal">
				<div class="control-group span6">
					<label class="control-label" for="main_client_base">主要客户群：</label>
					<div class="controls">
						<input type="text" id="main_client_base" name="main_client_base"></div>
				</div>
				<div class="control-group span6">
					<label class="control-label" for="business_rang">营业范围：</label>
					<div class="controls">
						<input type="text" id="business_rang" name="business_rang" ></div>
				</div>
			</div>
			<div class="row-fluid form-horizontal">
				<div class="control-group span6">
					<label class="control-label" for="business_area">营业区域：</label>
					<div class="controls">
						<input type="text" id="business_area" name="business_area"></div>
				</div>
				<div class="control-group span6">
					<label class="control-label" for="net_spread">网络推广情况：</label>
					<div class="controls">
						<input type="text" id="net_spread" name="net_spread" ></div>
				</div>
			</div>

			<div class="row-fluid form-horizontal">
				<div class="control-group">
					<label class="control-label" for="description">备注：</label>
					<div class="controls">
						<textarea  name="description" rows="5" class="span10"></textarea>
					</div>
				</div>
      </div>
			<div class="row-fluid form-horizontal">
				<div class="action span3" style="margin: 0 auto;float:none;">
					<input class="btn default" type="button" value="保存" onclick="save();">
          <input  class="btn" type="button" value="取消" onclick="go_return_url();">
        </div>
			</form>
		</div>
	</div>
</div>
